//
// Created by Administrator on 2020/1/6.
//

#ifndef WORLDMAGISK_NAMEDPIPE_H
#define WORLDMAGISK_NAMEDPIPE_H

#include <string>

class NamedPipe {
public:
    NamedPipe(const std::string &name);
    bool mReady;

    int Write(const std::string &content);

    int Read(std::string &result);

    void Close();

private:
    std::string mName;
    FILE* mPipeFD;
};


#endif //WORLDMAGISK_NAMEDPIPE_H
